import {ADDPERSON} from '../constant'
const init=[{username:'Tom',age:18}]
export default function person_reducer(prev=init,action){
  console.log('@@@@',prev);
  const {type,data}=action
  switch (type) {
    case ADDPERSON:
      return [data,...prev]
    default:
      return prev
  }
}
